home *** CD-ROM | disk | FTP | other *** search
- ' This simple macro asks users for a layer, cycles through
- ' the entire drawing counting the number of objects on that layer.
- '
- ' Un-remark these next 2 lines to make the input box appear in the upper
- ' left corner of the DesignCAD window, so it does not cover the drawing area.
- ' Sys(130) = 5
- ' Sys(131) = 5
- ' Truncate the number to the right of the decimal
- Precision 0
- ' Get Layer from user
- Input "Count Objects on Which Layer??", LayNum
- ' sys(9) is the number of entities
- for j = 1 to sys(9)
- ' Get the Attributes of each object
- getattr j, type, grp, LayNum2
- ' If this object is on the correct layer then
- if LayNum = LayNum2 then
- a = a + 1
- endif
- ' Get next Object
- next j
- ' We've gone through the entire drawing, display results.
- Message "There are ", a, " objects in layer ", LayNum
- End